package com.qf.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Book {
    //转换JSON时为了与数据库保持字段顺序一样，添加 @JSONField(ordinal = 1)注解
    @JSONField(ordinal = 1)
    private Integer id;
    @JSONField(ordinal = 2)
    private String name;
    @JSONField(ordinal = 3)
    private String author;
    @JSONField(ordinal = 4)
    private String publish;
    @JSONField(ordinal = 5)
    private String sort;
}
